package se.webbzon.boltzmann.game.object.inventory.page;

import java.awt.Image;

import se.webbzon.boltzmann.game.object.inventory.GameInventory;
import se.webbzon.boltzmann.game.object.inventory.layout.MinigameInventoryLayout;
import se.webbzon.boltzmann.input.Button;
import se.webbzon.boltzmann.player.Player;
import se.webbzon.oschi01.worldcamera.WorldCameraPane;

public class MinigameInventoryPage extends AbstractGameInventoryPage {
	
	// The layout of the minigame inventory
	private final MinigameInventoryLayout layout;
	
	/*============================================================
	Constructors
	============================================================*/

	/** Creates a new minigame inventory page. **/
	public MinigameInventoryPage(	GameInventory inventory, 
									Player player,
									MinigameInventoryLayout layout) {
		super(inventory, player);
		this.layout = layout;
	}
	
	/*============================================================
	Public Methods
	============================================================*/

	@Override public void onDraw(WorldCameraPane hud) {
		// Make the subsequent drawings transparent
		hud.setTransparency(0.95f);
				
		final Image inventoryImage = layout.getInventoryImage();
		final int 	xOffset = layout.getXOffset(),
					yOffset = layout.getYOffset();
		hud.drawImage(inventoryImage, xOffset, yOffset);
	}

	@Override public void onEnterLeft() {
		this.getInventory().selectRightArrow();
	}

	@Override public void onEnterRight() {
		this.getInventory().selectLeftArrow();
	}

	@Override public void buttonPressed(Button button) {
		// TODO Auto-generated method stub
		
	}

}
